package com.ex.pojo;

import lombok.Data;

import java.util.List;

/**
 * TODO
 * discrb:
 *
 * @Author CD
 * @Date2025/6/6 22:17
 */
@Data
public class Result {
    private Integer code;
    private String mess;
    private List data;
    public static Result sucess(){
        Result result = new Result();
        result.setCode(200);
        result.setMess("成功");
        return result;
    }
    public static Result sucess(List data){
        Result result = new Result();
        result.setCode(200);
        result.setMess("成功");
        result.setData(data);
        return result;
    }
    public static Result err(String mess){
        Result result = new Result();
        result.setCode(500);
        result.setMess(mess);
        return result;
    }
 }
